<template>
  <Form :model="bpmModel" ref="bpmModel" :label-width="100" class="ivu-form-no-margin-bottom">
    <Form-item label="流程模式" prop="type">
      <Select v-model="bpmModel.type">
        <Option v-for="item in bpmTypes" :value="item.value" :key="item.value">{{ item.label }}</Option>
      </Select>
    </Form-item>
  </Form>
</template>

<script>
import { FORM_TYPE_INDICATOR, FORM_TYPE_TASK, FORM_TYPE_DECLARATION, FORM_TYPE_RATING } from '../../formConst'
export default {
  components: {},
  data() {
    return {
      bpmModel: { type: FORM_TYPE_DECLARATION },
      bpmTypes: [
        {
          value: FORM_TYPE_DECLARATION,
          label: '审批流程'
        },
        {
          value: FORM_TYPE_RATING,
          label: '评分流程'
        }
      ],
      actions: [
        {
          text: '确定',
          theme: 'primary',
          handle: () => {
            this.$emit('Close', this.bpmModel.type)
          }
        },
        {
          text: this.$t('common.close'),
          handle: () => {
            this.$emit('Close')
          }
        }
      ]
    }
  },
  created() {
    this.$emit('SetTitle', '新增流程')
    this.$emit('SetPageMinHeight', 150)
    this.$emit('SetPageActions', this.actions)
  },
  methods: {}
}
</script>

<style lang="less" scoped></style>
